package com.mezz.bones.im.logic.domain.entity;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * IM单聊
 * </p>
 *
 * @author mezz
 * @since 2024-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "chat_message_offline", autoResultMap = true)
@ApiModel(value="ChatMessageOffline对象", description="IM单聊")
public class ChatMessageOffline implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "消息KEY")
    private String msgKey;

    @ApiModelProperty(value = "消息所属者")
    private String userId;

    @ApiModelProperty(value = "消息对端用户ID")
    private String peerId;

    @ApiModelProperty(value = "1单聊2群聊")
    private Integer peerType;

    @ApiModelProperty(value = "消息序列号")
    private String msgSeq;

    @ApiModelProperty(value = "消息类型(0普通用户消息 1系统消息)")
    private Integer msgType;

    @ApiModelProperty(value = "消息扩展信息")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject msgExtra;

    @ApiModelProperty(value = "消息内容")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject content;

    /**
     * @see com.mezz.bones.im.common.enums.ContentTypeEnum
     */
    @ApiModelProperty(value = "内容类型(文本,音频，视频，自定义消息)")
    private String contentType;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    private Integer isDel;


}
